home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000147_icon-group-sender _Wed Jul 7 08:11:25 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
4KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id IAA00687
for icon-group-addresses; Wed, 7 Jul 1999 08:09:25 -0700 (MST)
Message-Id: <199907071509.IAA00687@baskerville.CS.Arizona.EDU>
From: "Bob Alexander" <bobalex@ix.netcom.com>
To: "Icon Project" <icon-project@optima.CS.Arizona.EDU>,
"Icon Group" <icon-group@optima.CS.Arizona.EDU>
Subject: noncase.icn
Date: Sat, 3 Jul 1999 19:28:57 -0700
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
This is a multi-part message in MIME format.
------=_NextPart_000_001B_01BEC58A.4BC65380
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_001C_01BEC58A.4BCDF4A0"
------=_NextPart_001_001C_01BEC58A.4BCDF4A0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
There were a few messages recently mentioning bugs in the IPL module =
procs/noncase.icn. Sorry I've taken so long to respond to this (I'm the =
author).
I had stumbled across and corrected those same bugs a while back (Jan =
'98, if my source code comments are to be believed), but it looks like I =
never submitted the corrected version to the Icon Project. The changes I =
made were virtually identical to the suggestions made in this forum. The =
updated file is attached -- it's small (Icon Project, can you make this =
update to the library?).
-- Bob
------=_NextPart_001_001C_01BEC58A.4BCDF4A0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>There were a few messages recently mentioning bugs =
in the IPL=20
module procs/noncase.icn. Sorry I've taken so long to respond to this =
(I'm the=20
author).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>I had stumbled across and corrected those same bugs =
a while=20
back (Jan '98, if my source code comments are to be believed), but it =
looks like=20
I never submitted the corrected version to the Icon Project. The changes =
I made=20
were virtually identical to the suggestions made in this forum. The =
updated file=20
is attached -- it's small (Icon Project, can you make this update to the =
library?).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>-- Bob</FONT></DIV></BODY></HTML>
------=_NextPart_001_001C_01BEC58A.4BCDF4A0--
------=_NextPart_000_001B_01BEC58A.4BC65380
Content-Type: text/icon;
name="noncase.icn"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="noncase.icn"
Content-Transfer-Encoding: quoted-printable
#########################################################################=
###
#
# File: noncase.icn
#
# Subject: Procedures for case-independent matching
#
# Author: Robert J. Alexander
#
# Date: January 9, 1998
#
#########################################################################=
###
#
# This file is in the public domain.
#
#########################################################################=
###
#
# Kit of case-independent versions of Icon's built-in string-analysis
# procedures.
#
#########################################################################=
###
procedure c_find(s1,s2,i1,i2)
local scanPos,endPos
scanPos :=3D match("",s2,i1,i2)
endPos :=3D many(&cset,s2,i1,i2) | scanPos
suspend scanPos - 1 + find(map(s1),
map((if \s2 then s2 else &subject)[scanPos:endPos]))
end
procedure c_many(c,s,i1,i2)
return many(c_cset(c),s,i1,i2)
end
procedure c_match(s1,s2,i1,i2)
local scanPos,endPos
scanPos :=3D match("",s2,i1,i2)
endPos :=3D scanPos + *s1
return (map(s1) =3D=3D map((if \s2 then s2 else =
&subject)[scanPos:endPos]),endPos)
end
procedure c_upto(c,s,i1,i2)
suspend upto(c_cset(c),s,i1,i2)
end
procedure c_cset(c)
static lstring,ustring
initial {
lstring :=3D string(&lcase)
ustring :=3D string(&ucase)
}
return cset(map(c) || map(c,lstring,ustring))
end
------=_NextPart_000_001B_01BEC58A.4BC65380--